%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for queries/functions/custom-query-forum-names-upper"
    Bucket0("Bucket 0 (root)<br /><br />1: <br />ᐳ: Access[7], Access[8], Object[9]<br />2: PgSelect[6]<br />3: PgSelectRows[11]<br />4: __ListTransform[10]"):::bucket
    Bucket1("Bucket 1 (subroutine)<br /><br />ROOT PgClassExpression{1}ᐸ__forum_names__.vᐳ[14]"):::bucket
    Bucket2("Bucket 2 (listItem)<br /><br />ROOT __Item{2}ᐸ10ᐳ[15]"):::bucket
    end
    Bucket0 --> Bucket1 & Bucket2

    %% plan dependencies
    Object9{{"Object[9∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access7{{"Access[7∈0] ➊<br />ᐸ2.pgSettingsᐳ"}}:::plan
    Access8{{"Access[8∈0] ➊<br />ᐸ2.withPgClientᐳ"}}:::plan
    Access7 & Access8 --> Object9
    PgSelect6[["PgSelect[6∈0] ➊<br />ᐸforum_namesᐳ"]]:::plan
    Object9 --> PgSelect6
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ"]:::plan
    __Value2 --> Access7
    __Value2 --> Access8
    __ListTransform10[["__ListTransform[10∈0] ➊<br />ᐸeach:6ᐳ<br />More deps:<br />- PgSelectRows[11]"]]:::plan
    PgSelectRows11[["PgSelectRows[11∈0] ➊<br />Dependents: 2"]]:::plan
    PgSelect6 --> PgSelectRows11
    __Item12[/"__Item[12∈1]<br />ᐸ11ᐳ<br />More deps:<br />- PgSelectRows[11]"\]:::itemplan
    PgSelectSingle13{{"PgSelectSingle[13∈1]<br />ᐸtextᐳ"}}:::plan
    __Item12 --> PgSelectSingle13
    PgClassExpression14{{"PgClassExpression[14∈1]<br />ᐸ__forum_names__.vᐳ"}}:::plan
    PgSelectSingle13 --> PgClassExpression14
    __Item15[/"__Item[15∈2]<br />ᐸ10ᐳ"\]:::itemplan
    __ListTransform10 ==> __Item15
    PgSelectSingle16{{"PgSelectSingle[16∈2]<br />ᐸtextᐳ"}}:::plan
    __Item15 --> PgSelectSingle16
    PgClassExpression17{{"PgClassExpression[17∈2]<br />ᐸ__forum_names__.vᐳ"}}:::plan
    PgSelectSingle16 --> PgClassExpression17
    Lambda18{{"Lambda[18∈2]"}}:::plan
    PgClassExpression17 --> Lambda18

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,PgSelect6,Access7,Access8,Object9,__ListTransform10,PgSelectRows11 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,__Item12,PgSelectSingle13,PgClassExpression14 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,__Item15,PgSelectSingle16,PgClassExpression17,Lambda18 bucket2

